home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1995 March / Macworld CD-ROM (March 1995).cdr / Updaters / Symantec C++ 6.0.1 Update / Library Updates / Mac #includes / Apple #includes / QuickDraw.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-06-18  |  29.3 KB  |  1,079 lines  |  [TEXT/KAHL]

  1.  
  2. /************************************************************
  3.  
  4. Created: Tuesday, December 3, 1991 at 4:53 PM
  5.  Quickdraw.h
  6.  C Interface to the Macintosh Libraries
  7.  
  8.  
  9.   Copyright Apple Computer, Inc. 1985-1991
  10.   All rights reserved
  11.  
  12. ************************************************************/
  13.  
  14.  
  15. #ifndef __QUICKDRAW__
  16. #define __QUICKDRAW__
  17.  
  18. #ifndef __TYPES__
  19. #include <Types.h>
  20. #endif
  21.  
  22.  
  23. enum {
  24.  
  25.  invalColReq = -1,                    /*invalid color table request*/
  26.  
  27. /* transfer modes */
  28.  srcCopy = 0,                        /*the 16 transfer modes*/
  29.  srcOr = 1,
  30.  srcXor = 2,
  31.  srcBic = 3,
  32.  notSrcCopy = 4,
  33.  notSrcOr = 5,
  34.  notSrcXor = 6,
  35.  notSrcBic = 7,
  36.  patCopy = 8,
  37.  patOr = 9,
  38.  patXor = 10,
  39.  patBic = 11,
  40.  notPatCopy = 12,
  41.  notPatOr = 13,
  42.  notPatXor = 14,
  43.  notPatBic = 15,
  44.  
  45. /* Special Text Transfer Mode */
  46.  grayishTextOr = 49,
  47.  
  48. /* Arithmetic transfer modes */
  49.  blend = 32,
  50.  addPin = 33
  51. };
  52. enum {
  53.  addOver = 34,
  54.  subPin = 35,
  55.  addMax = 37,
  56.  adMax = 37,
  57.  subOver = 38,
  58.  adMin = 39,
  59.  ditherCopy = 64,
  60.  
  61. /* Transparent mode constant */
  62.  transparent = 36,
  63.  
  64. /* QuickDraw color separation constants */
  65.  normalBit = 0,                        /*normal screen mapping*/
  66.  inverseBit = 1,                    /*inverse screen mapping*/
  67.  redBit = 4,                        /*RGB additive mapping*/
  68.  greenBit = 3,
  69.  blueBit = 2,
  70.  cyanBit = 8,                        /*CMYBk subtractive mapping*/
  71.  magentaBit = 7,
  72.  yellowBit = 6,
  73.  blackBit = 5,
  74.  blackColor = 33,                    /*colors expressed in these mappings*/
  75.  whiteColor = 30,
  76.  redColor = 205
  77. };
  78. enum {
  79.  greenColor = 341,
  80.  blueColor = 409,
  81.  cyanColor = 273,
  82.  magentaColor = 137,
  83.  yellowColor = 69,
  84.  
  85.  picLParen = 0,                        /*standard picture comments*/
  86.  picRParen = 1,
  87.  
  88.  normal = 0,
  89.  bold = 1,
  90.  italic = 2,
  91.  underline = 4,
  92.  outline = 8,
  93.  shadow = 0x10,
  94.  condense = 0x20,
  95.  extend = 0x40,
  96.  
  97.  clutType = 0,                        /*0 if lookup table*/
  98.  fixedType = 1,                        /*1 if fixed table*/
  99.  directType = 2,                    /*2 if direct values*/
  100.  
  101.  gdDevType = 0,                        /*0 = monochrome 1 = color*/
  102.  burstDevice = 7
  103. };
  104. enum {
  105.  ext32Device = 8,
  106.  ramInit = 10,                        /*1 if initialized from 'scrn' resource*/
  107.  mainScreen = 11,                    /* 1 if main screen */
  108.  allInit = 12,                        /* 1 if all devices initialized */
  109.  screenDevice = 13,                    /*1 if screen device [not used]*/
  110.  noDriver = 14,                        /* 1 if no driver for this GDevice */
  111.  screenActive = 15,                    /*1 if in use*/
  112.  
  113.  hiliteBit = 7,                        /*flag bit in HiliteMode (lowMem flag)*/
  114.  pHiliteBit = 0,                    /*flag bit in HiliteMode used with BitClr procedure*/
  115.  
  116.  defQDColors = 127,                    /*resource ID of clut for default QDColors*/
  117.  
  118. /* pixel type */
  119.  RGBDirect = 16,                    /* 16 & 32 bits/pixel pixelType value */
  120.  
  121. /* pmVersion values */
  122.  baseAddr32 = 4,                    /*pixmap base address is 32-bit address*/
  123.  
  124.  rgnOverflowErr = -147,                /* Region accumulation failed. Resulting region may be currupt */
  125.  insufficientStackErr = -149        /* QuickDraw could not complete the operation */
  126. };
  127.  
  128. enum {frame,paint,erase,invert,fill};
  129. typedef unsigned char GrafVerb;
  130.  
  131. enum {chunky,chunkyPlanar,planar};
  132. typedef unsigned char PixelType;
  133.  
  134.  
  135. typedef short Bits16[16];
  136.  
  137. /***************   IMPORTANT NOTE REGARDING PATTERN  **************************************
  138.    The old array defintion of Pattern would cause 68000 based CPU's to crash in certain circum-
  139.    stances. The new struct definition is safe, but may require source code changes to compile.
  140.    Read the details in Appendix J of:
  141.            "MPW E.T.O. #6 Latest Libraries/Interfaces"
  142.     If you decide that you are safe, and happier with the old definition, you may add
  143.    "-d dangerousPattern" to your C command line to avoid compilation errors without changing
  144.    your source code.
  145. *********************************************************************************************/
  146.  
  147. #if defined(THINK_C) || defined(THINK_CPLUS)
  148. #define dangerousPattern 1        /* for THINK C backwards compatibility */
  149. #endif
  150. #ifdef dangerousPattern
  151. typedef unsigned char Pattern[8];
  152. typedef Pattern *PatPtr;
  153. typedef const unsigned char *ConstPatternParam;
  154. #else
  155. struct Pattern{
  156.    unsigned char pat[8];
  157. };
  158. typedef struct Pattern Pattern;
  159. typedef Pattern *PatPtr;
  160. typedef const Pattern *ConstPatternParam;
  161. #endif
  162. typedef PatPtr *PatHandle;
  163.  
  164. typedef char QDByte, *QDPtr, **QDHandle;
  165.  
  166. typedef short QDErr;
  167.  
  168. enum {singleDevicesBit = 0,dontMatchSeedsBit = 1,allDevicesBit = 2};
  169.  
  170. enum {singleDevices = 1 << singleDevicesBit,dontMatchSeeds = 1 << dontMatchSeedsBit,
  171.  allDevices = 1 << allDevicesBit};
  172. typedef unsigned long DeviceLoopFlags;
  173.  
  174.  
  175. struct FontInfo {
  176.  short ascent;
  177.  short descent;
  178.  short widMax;
  179.  short leading;
  180. };
  181.  
  182. typedef struct FontInfo FontInfo;
  183.  
  184. struct BitMap {
  185.  Ptr baseAddr;
  186.  short rowBytes;
  187.  Rect bounds;
  188. };
  189.  
  190. typedef struct BitMap BitMap;
  191. typedef BitMap *BitMapPtr, **BitMapHandle;
  192.  
  193. struct Cursor {
  194.  Bits16 data;
  195.  Bits16 mask;
  196.  Point hotSpot;
  197. };
  198.  
  199. typedef struct Cursor Cursor;
  200. typedef Cursor *CursPtr, **CursHandle;
  201.  
  202. struct PenState {
  203.  Point pnLoc;
  204.  Point pnSize;
  205.  short pnMode;
  206.  Pattern pnPat;
  207. };
  208.  
  209. typedef struct PenState PenState;
  210.  
  211. struct Region {
  212.  short rgnSize;                        /*size in bytes*/
  213.  Rect rgnBBox;                        /*enclosing rectangle*/
  214. };
  215.  
  216. typedef struct Region Region;
  217. typedef Region *RgnPtr, **RgnHandle;
  218.  
  219. struct Picture {
  220.  short picSize;
  221.  Rect picFrame;
  222. };
  223.  
  224. typedef struct Picture Picture;
  225. typedef Picture *PicPtr, **PicHandle;
  226.  
  227. struct Polygon {
  228.  short polySize;
  229.  Rect polyBBox;
  230.  Point polyPoints[1];
  231. };
  232.  
  233. typedef struct Polygon Polygon;
  234. typedef Polygon *PolyPtr, **PolyHandle;
  235.  
  236. struct QDProcs {
  237.  Ptr textProc;
  238.  Ptr lineProc;
  239.  Ptr rectProc;
  240.  Ptr rRectProc;
  241.  Ptr ovalProc;
  242.  Ptr arcProc;
  243.  Ptr polyProc;
  244.  Ptr rgnProc;
  245.  Ptr bitsProc;
  246.  Ptr commentProc;
  247.  Ptr txMeasProc;
  248.  Ptr getPicProc;
  249.  Ptr putPicProc;
  250. };
  251.  
  252. typedef struct QDProcs QDProcs;
  253. typedef QDProcs *QDProcsPtr;
  254.  
  255. struct GrafPort {
  256.  short device;
  257.  BitMap portBits;
  258.  Rect portRect;
  259.  RgnHandle visRgn;
  260.  RgnHandle clipRgn;
  261.  Pattern bkPat;
  262.  Pattern fillPat;
  263.  Point pnLoc;
  264.  Point pnSize;
  265.  short pnMode;
  266.  Pattern pnPat;
  267.  short pnVis;
  268.  short txFont;
  269.  Style txFace;                        /*txFace is unpacked byte but push as short*/
  270.  char filler;
  271.  short txMode;
  272.  short txSize;
  273.  Fixed spExtra;
  274.  long fgColor;
  275.  long bkColor;
  276.  short colrBit;
  277.  short patStretch;
  278.  Handle picSave;
  279.  Handle rgnSave;
  280.  Handle polySave;
  281.  QDProcsPtr grafProcs;
  282. };
  283.  
  284. typedef struct GrafPort GrafPort;
  285. typedef GrafPort *GrafPtr;
  286.  
  287.  
  288. typedef GrafPtr WindowPtr;
  289.  
  290. struct RGBColor {
  291.  unsigned short red;                /*magnitude of red component*/
  292.  unsigned short green;                /*magnitude of green component*/
  293.  unsigned short blue;                /*magnitude of blue component*/
  294. };
  295.  
  296. typedef struct RGBColor RGBColor;
  297.  
  298.  
  299. typedef pascal Boolean (*ColorSearchProcPtr)(RGBColor *rgb, long *position);
  300. typedef pascal Boolean (*ColorComplementProcPtr)(RGBColor *rgb);
  301.  
  302. struct ColorSpec {
  303.  short value;                        /*index or other value*/
  304.  RGBColor rgb;                        /*true color*/
  305. };
  306.  
  307. typedef struct ColorSpec ColorSpec;
  308. typedef ColorSpec *ColorSpecPtr;
  309.  
  310.  
  311. typedef ColorSpec CSpecArray[1];
  312.  
  313. struct ColorTable {
  314.  long ctSeed;                        /*unique identifier for table*/
  315.  short ctFlags;                        /*high bit: 0 = PixMap; 1 = device*/
  316.  short ctSize;                        /*number of entries in CTTable*/
  317.  CSpecArray ctTable;                /*array [0..0] of ColorSpec*/
  318. };
  319.  
  320. typedef struct ColorTable ColorTable;
  321. typedef ColorTable *CTabPtr, **CTabHandle;
  322.  
  323. struct MatchRec {
  324.  unsigned short red;
  325.  unsigned short green;
  326.  unsigned short blue;
  327.  long matchData;
  328. };
  329.  
  330. typedef struct MatchRec MatchRec;
  331.  
  332. struct PixMap {
  333.  Ptr baseAddr;                        /*pointer to pixels*/
  334.  short rowBytes;                    /*offset to next line*/
  335.  Rect bounds;                        /*encloses bitmap*/
  336.  short pmVersion;                    /*pixMap version number*/
  337.  short packType;                    /*defines packing format*/
  338.  long packSize;                        /*length of pixel data*/
  339.  Fixed hRes;                        /*horiz. resolution (ppi)*/
  340.  Fixed vRes;                        /*vert. resolution (ppi)*/
  341.  short pixelType;                    /*defines pixel type*/
  342.  short pixelSize;                    /*# bits in pixel*/
  343.  short cmpCount;                    /*# components in pixel*/
  344.  short cmpSize;                        /*# bits per component*/
  345.  long planeBytes;                    /*offset to next plane*/
  346.  CTabHandle pmTable;                /*color map for this pixMap*/
  347.  long pmReserved;                    /*for future use. MUST BE 0*/
  348. };
  349.  
  350. typedef struct PixMap PixMap;
  351. typedef PixMap *PixMapPtr, **PixMapHandle;
  352.  
  353. struct PixPat {
  354.  short patType;                        /*type of pattern*/
  355.  PixMapHandle patMap;                /*the pattern's pixMap*/
  356.  Handle patData;                    /*pixmap's data*/
  357.  Handle patXData;                    /*expanded Pattern data*/
  358.  short patXValid;                    /*flags whether expanded Pattern valid*/
  359.  Handle patXMap;                    /*Handle to expanded Pattern data*/
  360.  Pattern pat1Data;                    /*old-Style pattern/RGB color*/
  361. };
  362.  
  363. typedef struct PixPat PixPat;
  364. typedef PixPat *PixPatPtr, **PixPatHandle;
  365.  
  366. struct CCrsr {
  367.  short crsrType;                    /*type of cursor*/
  368.  PixMapHandle crsrMap;                /*the cursor's pixmap*/
  369.  Handle crsrData;                    /*cursor's data*/
  370.  Handle crsrXData;                    /*expanded cursor data*/
  371.  short crsrXValid;                    /*depth of expanded data (0 if none)*/
  372.  Handle crsrXHandle;                /*future use*/
  373.  Bits16 crsr1Data;                    /*one-bit cursor*/
  374.  Bits16 crsrMask;                    /*cursor's mask*/
  375.  Point crsrHotSpot;                    /*cursor's hotspot*/
  376.  long crsrXTable;                    /*private*/
  377.  long crsrID;                        /*private*/
  378. };
  379.  
  380. typedef struct CCrsr CCrsr;
  381. typedef CCrsr *CCrsrPtr, **CCrsrHandle;
  382.  
  383. struct CIcon {
  384.  PixMap iconPMap;                    /*the icon's pixMap*/
  385.  BitMap iconMask;                    /*the icon's mask*/
  386.  BitMap iconBMap;                    /*the icon's bitMap*/
  387.  Handle iconData;                    /*the icon's data*/
  388.  short iconMaskData[1];                /*icon's mask and BitMap data*/
  389. };
  390.  
  391. typedef struct CIcon CIcon;
  392. typedef CIcon *CIconPtr, **CIconHandle;
  393.  
  394. struct GammaTbl {
  395.  short gVersion;                    /*gamma version number*/
  396.  short gType;                        /*gamma data type*/
  397.  short gFormulaSize;                /*Formula data size*/
  398.  short gChanCnt;                    /*number of channels of data*/
  399.  short gDataCnt;                    /*number of values/channel*/
  400.  short gDataWidth;                    /*bits/corrected value (data packed to next larger byte size)*/
  401.  short gFormulaData[1];                /*data for formulas followed by gamma values*/
  402. };
  403.  
  404. typedef struct GammaTbl GammaTbl;
  405. typedef GammaTbl *GammaTblPtr, **GammaTblHandle;
  406.  
  407. struct ITab {
  408.  long iTabSeed;                        /*copy of CTSeed from source CTable*/
  409.  short iTabRes;                        /*bits/channel resolution of iTable*/
  410.  unsigned char iTTable[1];            /*byte colortable index values*/
  411. };
  412.  
  413. typedef struct ITab ITab;
  414. typedef ITab *ITabPtr, **ITabHandle;
  415.  
  416. struct SProcRec {
  417.  Handle nxtSrch;                    /*SProcHndl Handle to next SProcRec*/
  418.  ColorSearchProcPtr srchProc;        /*pointer to search procedure*/
  419. };
  420.  
  421. typedef struct SProcRec SProcRec;
  422. typedef SProcRec *SProcPtr, **SProcHndl;
  423.  
  424. struct CProcRec {
  425.  Handle nxtComp;                    /*CProcHndl Handle to next CProcRec*/
  426.  ColorComplementProcPtr compProc;    /*pointer to complement procedure*/
  427. };
  428.  
  429. typedef struct CProcRec CProcRec;
  430. typedef CProcRec *CProcPtr, **CProcHndl;
  431.  
  432. struct GDevice {
  433.  short gdRefNum;                    /*driver's unit number*/
  434.  short gdID;                        /*client ID for search procs*/
  435.  short gdType;                        /*fixed/CLUT/direct*/
  436.  ITabHandle gdITable;                /*Handle to inverse lookup table*/
  437.  short gdResPref;                    /*preferred resolution of GDITable*/
  438.  SProcHndl gdSearchProc;            /*search proc list head*/
  439.  CProcHndl gdCompProc;                /*complement proc list*/
  440.  short gdFlags;                        /*grafDevice flags word*/
  441.  PixMapHandle gdPMap;                /*describing pixMap*/
  442.  long gdRefCon;                        /*reference value*/
  443.  Handle gdNextGD;                    /*GDHandle Handle of next gDevice*/
  444.  Rect gdRect;                        /* device's bounds in global coordinates*/
  445.  long gdMode;                        /*device's current mode*/
  446.  short gdCCBytes;                    /*depth of expanded cursor data*/
  447.  short gdCCDepth;                    /*depth of expanded cursor data*/
  448.  Handle gdCCXData;                    /*Handle to cursor's expanded data*/
  449.  Handle gdCCXMask;                    /*Handle to cursor's expanded mask*/
  450.  long gdReserved;                    /*future use. MUST BE 0*/
  451. };
  452.  
  453. typedef struct GDevice GDevice;
  454. typedef GDevice *GDPtr, **GDHandle;
  455.  
  456. struct GrafVars {
  457.  RGBColor rgbOpColor;                /*color for addPin  subPin and average*/
  458.  RGBColor rgbHiliteColor;            /*color for hiliting*/
  459.  Handle pmFgColor;                    /*palette Handle for foreground color*/
  460.  short pmFgIndex;                    /*index value for foreground*/
  461.  Handle pmBkColor;                    /*palette Handle for background color*/
  462.  short pmBkIndex;                    /*index value for background*/
  463.  short pmFlags;                        /*flags for Palette Manager*/
  464. };
  465.  
  466. typedef struct GrafVars GrafVars;
  467. typedef GrafVars *GVarPtr, **GVarHandle;
  468.  
  469. struct CQDProcs {
  470.  Ptr textProc;
  471.  Ptr lineProc;
  472.  Ptr rectProc;
  473.  Ptr rRectProc;
  474.  Ptr ovalProc;
  475.  Ptr arcProc;
  476.  Ptr polyProc;
  477.  Ptr rgnProc;
  478.  Ptr bitsProc;
  479.  Ptr commentProc;
  480.  Ptr txMeasProc;
  481.  Ptr getPicProc;
  482.  Ptr putPicProc;
  483.  Ptr opcodeProc;                    /*fields added to QDProcs*/
  484.  Ptr newProc1;
  485.  Ptr newProc2;
  486.  Ptr newProc3;
  487.  Ptr newProc4;
  488.  Ptr newProc5;
  489.  Ptr newProc6;
  490. };
  491.  
  492. typedef struct CQDProcs CQDProcs;
  493. typedef CQDProcs *CQDProcsPtr;
  494.  
  495. struct CGrafPort {
  496.  short device;
  497.  PixMapHandle portPixMap;            /*port's pixel map*/
  498.  short portVersion;                    /*high 2 bits always set*/
  499.  Handle grafVars;                    /*Handle to more fields*/
  500.  short chExtra;                        /*character extra*/
  501.  short pnLocHFrac;                    /*pen fraction*/
  502.  Rect portRect;
  503.  RgnHandle visRgn;
  504.  RgnHandle clipRgn;
  505.  PixPatHandle bkPixPat;                /*background pattern*/
  506.  RGBColor rgbFgColor;                /*RGB components of fg*/
  507.  RGBColor rgbBkColor;                /*RGB components of bk*/
  508.  Point pnLoc;
  509.  Point pnSize;
  510.  short pnMode;
  511.  PixPatHandle pnPixPat;                /*pen's pattern*/
  512.  PixPatHandle fillPixPat;            /*fill pattern*/
  513.  short pnVis;
  514.  short txFont;
  515.  Style txFace;                        /*txFace is unpacked byte  push as short*/
  516.  char filler;
  517.  short txMode;
  518.  short txSize;
  519.  Fixed spExtra;
  520.  long fgColor;
  521.  long bkColor;
  522.  short colrBit;
  523.  short patStretch;
  524.  Handle picSave;
  525.  Handle rgnSave;
  526.  Handle polySave;
  527.  CQDProcsPtr grafProcs;
  528. };
  529.  
  530. typedef struct CGrafPort CGrafPort;
  531. typedef CGrafPort *CGrafPtr;
  532.  
  533.  
  534. typedef CGrafPtr CWindowPtr;
  535.  
  536. struct ReqListRec {
  537.  short reqLSize;                    /*request list size*/
  538.  short reqLData[1];                    /*request list data*/
  539. };
  540.  
  541. typedef struct ReqListRec ReqListRec;
  542.  
  543. struct OpenCPicParams {
  544.  Rect srcRect;
  545.  Fixed hRes;
  546.  Fixed vRes;
  547.  short version;
  548.  short reserved1;
  549.  long reserved2;
  550. };
  551.  
  552. typedef struct OpenCPicParams OpenCPicParams;
  553.  
  554.  
  555. typedef pascal void (*DeviceLoopDrawingProcPtr)(short depth, short deviceFlags, GDHandle targetDevice,  long userData);
  556.  
  557. extern struct  {
  558. char privates[76];
  559. long randSeed;
  560. BitMap screenBits;
  561. Cursor arrow;
  562. Pattern dkGray;
  563. Pattern ltGray;
  564. Pattern gray;
  565. Pattern black;
  566. Pattern white;
  567. GrafPtr thePort;
  568. }qd;
  569.  
  570.  
  571. #ifdef __cplusplus
  572. extern "C" {
  573. #endif
  574. pascal void InitGraf(void *globalPtr)
  575.  = 0xA86E; 
  576. pascal void OpenPort(GrafPtr port)
  577.  = 0xA86F; 
  578. pascal void InitPort(GrafPtr port)
  579.  = 0xA86D; 
  580. pascal void ClosePort(GrafPtr port)
  581.  = 0xA87D; 
  582. pascal void SetPort(GrafPtr port)
  583.  = 0xA873; 
  584. pascal void GetPort(GrafPtr *port)
  585.  = 0xA874; 
  586. pascal void GrafDevice(short device)
  587.  = 0xA872; 
  588. pascal void SetPortBits(const BitMap *bm)
  589.  = 0xA875; 
  590. pascal void PortSize(short width,short height)
  591.  = 0xA876; 
  592. pascal void MovePortTo(short leftGlobal,short topGlobal)
  593.  = 0xA877; 
  594. pascal void SetOrigin(short h,short v)
  595.  = 0xA878; 
  596. pascal void SetClip(RgnHandle rgn)
  597.  = 0xA879; 
  598. pascal void GetClip(RgnHandle rgn)
  599.  = 0xA87A; 
  600. pascal void ClipRect(const Rect *r)
  601.  = 0xA87B; 
  602. pascal void BackPat(ConstPatternParam pat)
  603.  = 0xA87C; 
  604. pascal void InitCursor(void)
  605.  = 0xA850; 
  606. pascal void SetCursor(const Cursor *crsr)
  607.  = 0xA851; 
  608. pascal void HideCursor(void)
  609.  = 0xA852; 
  610. pascal void ShowCursor(void)
  611.  = 0xA853; 
  612. pascal void ObscureCursor(void)
  613.  = 0xA856; 
  614. pascal void HidePen(void)
  615.  = 0xA896; 
  616. pascal void ShowPen(void)
  617.  = 0xA897; 
  618. pascal void GetPen(Point *pt)
  619.  = 0xA89A; 
  620. pascal void GetPenState(PenState *pnState)
  621.  = 0xA898; 
  622. pascal void SetPenState(const PenState *pnState)
  623.  = 0xA899; 
  624. pascal void PenSize(short width,short height)
  625.  = 0xA89B; 
  626. pascal void PenMode(short mode)
  627.  = 0xA89C; 
  628. pascal void PenPat(ConstPatternParam pat)
  629.  = 0xA89D; 
  630. pascal void PenNormal(void)
  631.  = 0xA89E; 
  632. pascal void MoveTo(short h,short v)
  633.  = 0xA893; 
  634. pascal void Move(short dh,short dv)
  635.  = 0xA894; 
  636. pascal void LineTo(short h,short v)
  637.  = 0xA891; 
  638. pascal void Line(short dh,short dv)
  639.  = 0xA892; 
  640. pascal void TextFont(short font)
  641.  = 0xA887; 
  642. pascal void TextFace(short face)
  643.  = 0xA888; 
  644. pascal void TextMode(short mode)
  645.  = 0xA889; 
  646. pascal void TextSize(short size)
  647.  = 0xA88A; 
  648. pascal void SpaceExtra(Fixed extra)
  649.  = 0xA88E; 
  650. pascal void DrawChar(short ch)
  651.  = 0xA883; 
  652. pascal void DrawString(ConstStr255Param s)
  653.  = 0xA884; 
  654. pascal void DrawText(const void *textBuf,short firstByte,short byteCount)
  655.  = 0xA885; 
  656. pascal short CharWidth(short ch)
  657.  = 0xA88D; 
  658. pascal short StringWidth(ConstStr255Param s)
  659.  = 0xA88C; 
  660. pascal short TextWidth(const void *textBuf,short firstByte,short byteCount)
  661.  = 0xA886; 
  662. pascal void MeasureText(short count,const void *textAddr,void *charLocs)
  663.  = 0xA837; 
  664. pascal void GetFontInfo(FontInfo *info)
  665.  = 0xA88B; 
  666. pascal void ForeColor(long color)
  667.  = 0xA862; 
  668. pascal void BackColor(long color)
  669.  = 0xA863; 
  670. pascal void ColorBit(short whichBit)
  671.  = 0xA864; 
  672. pascal void SetRect(Rect *r,short left,short top,short right,short bottom)
  673.  = 0xA8A7; 
  674. pascal void OffsetRect(Rect *r,short dh,short dv)
  675.  = 0xA8A8; 
  676. pascal void InsetRect(Rect *r,short dh,short dv)
  677.  = 0xA8A9; 
  678. pascal Boolean SectRect(const Rect *src1,const Rect *src2,Rect *dstRect)
  679.  = 0xA8AA; 
  680. pascal void UnionRect(const Rect *src1,const Rect *src2,Rect *dstRect)
  681.  = 0xA8AB; 
  682. pascal Boolean EqualRect(const Rect *rect1,const Rect *rect2)
  683.  = 0xA8A6; 
  684. pascal Boolean EmptyRect(const Rect *r)
  685.  = 0xA8AE; 
  686. pascal void FrameRect(const Rect *r)
  687.  = 0xA8A1; 
  688. pascal void PaintRect(const Rect *r)
  689.  = 0xA8A2; 
  690. pascal void EraseRect(const Rect *r)
  691.  = 0xA8A3; 
  692. pascal void InvertRect(const Rect *r)
  693.  = 0xA8A4; 
  694. pascal void FillRect(const Rect *r,ConstPatternParam pat)
  695.  = 0xA8A5; 
  696. pascal void FrameOval(const Rect *r)
  697.  = 0xA8B7; 
  698. pascal void PaintOval(const Rect *r)
  699.  = 0xA8B8; 
  700. pascal void EraseOval(const Rect *r)
  701.  = 0xA8B9; 
  702. pascal void InvertOval(const Rect *r)
  703.  = 0xA8BA; 
  704. pascal void FillOval(const Rect *r,ConstPatternParam pat)
  705.  = 0xA8BB; 
  706. pascal void FrameRoundRect(const Rect *r,short ovalWidth,short ovalHeight)
  707.  = 0xA8B0; 
  708. pascal void PaintRoundRect(const Rect *r,short ovalWidth,short ovalHeight)
  709.  = 0xA8B1; 
  710. pascal void EraseRoundRect(const Rect *r,short ovalWidth,short ovalHeight)
  711.  = 0xA8B2; 
  712. pascal void InvertRoundRect(const Rect *r,short ovalWidth,short ovalHeight)
  713.  = 0xA8B3; 
  714. pascal void FillRoundRect(const Rect *r,short ovalWidth,short ovalHeight,
  715.  ConstPatternParam pat)
  716.  = 0xA8B4; 
  717. pascal void FrameArc(const Rect *r,short startAngle,short arcAngle)
  718.  = 0xA8BE; 
  719. pascal void PaintArc(const Rect *r,short startAngle,short arcAngle)
  720.  = 0xA8BF; 
  721. pascal void EraseArc(const Rect *r,short startAngle,short arcAngle)
  722.  = 0xA8C0; 
  723. pascal void InvertArc(const Rect *r,short startAngle,short arcAngle)
  724.  = 0xA8C1; 
  725. pascal void FillArc(const Rect *r,short startAngle,short arcAngle,ConstPatternParam pat)
  726.  = 0xA8C2; 
  727. pascal RgnHandle NewRgn(void)
  728.  = 0xA8D8; 
  729. pascal void OpenRgn(void)
  730.  = 0xA8DA; 
  731. pascal void CloseRgn(RgnHandle dstRgn)
  732.  = 0xA8DB; 
  733. pascal OSErr BitMapToRegionGlue(RgnHandle region,const BitMap *bMap); 
  734. pascal OSErr BitMapToRegion(RgnHandle region,const BitMap *bMap)
  735.  = 0xA8D7; 
  736. pascal void DisposeRgn(RgnHandle rgn)
  737.  = 0xA8D9; 
  738. pascal void CopyRgn(RgnHandle srcRgn,RgnHandle dstRgn)
  739.  = 0xA8DC; 
  740. pascal void SetEmptyRgn(RgnHandle rgn)
  741.  = 0xA8DD; 
  742. pascal void SetRectRgn(RgnHandle rgn,short left,short top,short right,short bottom)
  743.  = 0xA8DE; 
  744. pascal void RectRgn(RgnHandle rgn,const Rect *r)
  745.  = 0xA8DF; 
  746. pascal void OffsetRgn(RgnHandle rgn,short dh,short dv)
  747.  = 0xA8E0; 
  748. pascal void InsetRgn(RgnHandle rgn,short dh,short dv)
  749.  = 0xA8E1; 
  750. pascal void SectRgn(RgnHandle srcRgnA,RgnHandle srcRgnB,RgnHandle dstRgn)
  751.  = 0xA8E4; 
  752. pascal void UnionRgn(RgnHandle srcRgnA,RgnHandle srcRgnB,RgnHandle dstRgn)
  753.  = 0xA8E5; 
  754. pascal void DiffRgn(RgnHandle srcRgnA,RgnHandle srcRgnB,RgnHandle dstRgn)
  755.  = 0xA8E6; 
  756. pascal void XorRgn(RgnHandle srcRgnA,RgnHandle srcRgnB,RgnHandle dstRgn)
  757.  = 0xA8E7; 
  758. pascal Boolean RectInRgn(const Rect *r,RgnHandle rgn)
  759.  = 0xA8E9; 
  760. pascal Boolean EqualRgn(RgnHandle rgnA,RgnHandle rgnB)
  761.  = 0xA8E3; 
  762. pascal Boolean EmptyRgn(RgnHandle rgn)
  763.  = 0xA8E2; 
  764. pascal void FrameRgn(RgnHandle rgn)
  765.  = 0xA8D2; 
  766. pascal void PaintRgn(RgnHandle rgn)
  767.  = 0xA8D3; 
  768. pascal void EraseRgn(RgnHandle rgn)
  769.  = 0xA8D4; 
  770. pascal void InvertRgn(RgnHandle rgn)
  771.  = 0xA8D5; 
  772. pascal void FillRgn(RgnHandle rgn,ConstPatternParam pat)
  773.  = 0xA8D6; 
  774. pascal void ScrollRect(const Rect *r,short dh,short dv,RgnHandle updateRgn)
  775.  = 0xA8EF; 
  776. pascal void CopyBits(const BitMap *srcBits,const BitMap *dstBits,const Rect *srcRect,
  777.  const Rect *dstRect,short mode,RgnHandle maskRgn)
  778.  = 0xA8EC; 
  779. pascal void SeedFill(const void *srcPtr,void *dstPtr,short srcRow,short dstRow,
  780.  short height,short words,short seedH,short seedV)
  781.  = 0xA839; 
  782. pascal void CalcMask(const void *srcPtr,void *dstPtr,short srcRow,short dstRow,
  783.  short height,short words)
  784.  = 0xA838; 
  785. pascal void CopyMask(const BitMap *srcBits,const BitMap *maskBits,const BitMap *dstBits,
  786.  const Rect *srcRect,const Rect *maskRect,const Rect *dstRect)
  787.  = 0xA817; 
  788. pascal PicHandle OpenPicture(const Rect *picFrame)
  789.  = 0xA8F3; 
  790. pascal void PicComment(short kind,short dataSize,Handle dataHandle)
  791.  = 0xA8F2; 
  792. pascal void ClosePicture(void)
  793.  = 0xA8F4; 
  794. pascal void DrawPicture(PicHandle myPicture,const Rect *dstRect)
  795.  = 0xA8F6; 
  796. pascal void KillPicture(PicHandle myPicture)
  797.  = 0xA8F5; 
  798. pascal PolyHandle OpenPoly(void)
  799.  = 0xA8CB; 
  800. pascal void ClosePoly(void)
  801.  = 0xA8CC; 
  802. pascal void KillPoly(PolyHandle poly)
  803.  = 0xA8CD; 
  804. pascal void OffsetPoly(PolyHandle poly,short dh,short dv)
  805.  = 0xA8CE; 
  806. pascal void FramePoly(PolyHandle poly)
  807.  = 0xA8C6; 
  808. pascal void PaintPoly(PolyHandle poly)
  809.  = 0xA8C7; 
  810. pascal void ErasePoly(PolyHandle poly)
  811.  = 0xA8C8; 
  812. pascal void InvertPoly(PolyHandle poly)
  813.  = 0xA8C9; 
  814. pascal void FillPoly(PolyHandle poly,ConstPatternParam pat)
  815.  = 0xA8CA; 
  816. pascal void SetPt(Point *pt,short h,short v)
  817.  = 0xA880; 
  818. pascal void LocalToGlobal(Point *pt)
  819.  = 0xA870; 
  820. pascal void GlobalToLocal(Point *pt)
  821.  = 0xA871; 
  822. pascal short Random(void)
  823.  = 0xA861; 
  824. pascal void StuffHex(void *thingPtr,ConstStr255Param s)
  825.  = 0xA866; 
  826. pascal Boolean GetPixel(short h,short v)
  827.  = 0xA865; 
  828. pascal void ScalePt(Point *pt,const Rect *srcRect,const Rect *dstRect)
  829.  = 0xA8F8; 
  830. pascal void MapPt(Point *pt,const Rect *srcRect,const Rect *dstRect)
  831.  = 0xA8F9; 
  832. pascal void MapRect(Rect *r,const Rect *srcRect,const Rect *dstRect)
  833.  = 0xA8FA; 
  834. pascal void MapRgn(RgnHandle rgn,const Rect *srcRect,const Rect *dstRect)
  835.  = 0xA8FB; 
  836. pascal void MapPoly(PolyHandle poly,const Rect *srcRect,const Rect *dstRect)
  837.  = 0xA8FC; 
  838. pascal void SetStdProcs(QDProcs *procs)
  839.  = 0xA8EA; 
  840. pascal void StdRect(GrafVerb verb,const Rect *r)
  841.  = 0xA8A0; 
  842. pascal void StdRRect(GrafVerb verb,const Rect *r,short ovalWidth,short ovalHeight)
  843.  = 0xA8AF; 
  844. pascal void StdOval(GrafVerb verb,const Rect *r)
  845.  = 0xA8B6; 
  846. pascal void StdArc(GrafVerb verb,const Rect *r,short startAngle,short arcAngle)
  847.  = 0xA8BD; 
  848. pascal void StdPoly(GrafVerb verb,PolyHandle poly)
  849.  = 0xA8C5; 
  850. pascal void StdRgn(GrafVerb verb,RgnHandle rgn)
  851.  = 0xA8D1; 
  852. pascal void StdBits(const BitMap *srcBits,const Rect *srcRect,const Rect *dstRect,
  853.  short mode,RgnHandle maskRgn)
  854.  = 0xA8EB; 
  855. pascal void StdComment(short kind,short dataSize,Handle dataHandle)
  856.  = 0xA8F1; 
  857. pascal short StdTxMeas(short byteCount,const void *textAddr,Point *numer,
  858.  Point *denom,FontInfo *info)
  859.  = 0xA8ED; 
  860. pascal void StdGetPic(void *dataPtr,short byteCount)
  861.  = 0xA8EE; 
  862. pascal void StdPutPic(const void *dataPtr,short byteCount)
  863.  = 0xA8F0; 
  864. pascal void AddPt(Point src,Point *dst)
  865.  = 0xA87E; 
  866. #if !defined(__SC__) || !defined(THINK_C)
  867. void subpt(Point *src,Point *dst); 
  868. #endif
  869. pascal Boolean EqualPt(Point pt1,Point pt2)
  870.  = 0xA881; 
  871. pascal Boolean PtInRect(Point pt,const Rect *r)
  872.  = 0xA8AD; 
  873. pascal void Pt2Rect(Point pt1,Point pt2,Rect *dstRect)
  874.  = 0xA8AC; 
  875. pascal void PtToAngle(const Rect *r,Point pt,short *angle)
  876.  = 0xA8C3; 
  877. pascal Boolean PtInRgn(Point pt,RgnHandle rgn)
  878.  = 0xA8E8; 
  879. pascal void StdText(short count,const void *textAddr,Point numer,Point denom)
  880.  = 0xA882; 
  881. pascal void StdLine(Point newPt)
  882.  = 0xA890; 
  883. pascal void OpenCPort(CGrafPtr port)
  884.  = 0xAA00; 
  885. pascal void InitCPort(CGrafPtr port)
  886.  = 0xAA01; 
  887. pascal void CloseCPort(CGrafPtr port)
  888.  = 0xA87D; 
  889. pascal PixMapHandle NewPixMap(void)
  890.  = 0xAA03; 
  891. pascal void DisposPixMap(PixMapHandle pm)
  892.  = 0xAA04; 
  893. pascal void DisposePixMap(PixMapHandle pm)
  894.  = 0xAA04; 
  895. pascal void CopyPixMap(PixMapHandle srcPM,PixMapHandle dstPM)
  896.  = 0xAA05; 
  897. pascal PixPatHandle NewPixPat(void)
  898.  = 0xAA07; 
  899. pascal void DisposPixPat(PixPatHandle pp)
  900.  = 0xAA08; 
  901. pascal void DisposePixPat(PixPatHandle pp)
  902.  = 0xAA08; 
  903. pascal void CopyPixPat(PixPatHandle srcPP,PixPatHandle dstPP)
  904.  = 0xAA09; 
  905. pascal void PenPixPat(PixPatHandle pp)
  906.  = 0xAA0A; 
  907. pascal void BackPixPat(PixPatHandle pp)
  908.  = 0xAA0B; 
  909. pascal PixPatHandle GetPixPat(short patID)
  910.  = 0xAA0C; 
  911. pascal void MakeRGBPat(PixPatHandle pp,const RGBColor *myColor)
  912.  = 0xAA0D; 
  913. pascal void FillCRect(const Rect *r,PixPatHandle pp)
  914.  = 0xAA0E; 
  915. pascal void FillCOval(const Rect *r,PixPatHandle pp)
  916.  = 0xAA0F; 
  917. pascal void FillCRoundRect(const Rect *r,short ovalWidth,short ovalHeight,
  918.  PixPatHandle pp)
  919.  = 0xAA10; 
  920. pascal void FillCArc(const Rect *r,short startAngle,short arcAngle,PixPatHandle pp)
  921.  = 0xAA11; 
  922. pascal void FillCRgn(RgnHandle rgn,PixPatHandle pp)
  923.  = 0xAA12; 
  924. pascal void FillCPoly(PolyHandle poly,PixPatHandle pp)
  925.  = 0xAA13; 
  926. pascal void RGBForeColor(const RGBColor *color)
  927.  = 0xAA14; 
  928. pascal void RGBBackColor(const RGBColor *color)
  929.  = 0xAA15; 
  930. pascal void SetCPixel(short h,short v,const RGBColor *cPix)
  931.  = 0xAA16; 
  932. pascal void SetPortPix(PixMapHandle pm)
  933.  = 0xAA06; 
  934. pascal void GetCPixel(short h,short v,RGBColor *cPix)
  935.  = 0xAA17; 
  936. pascal void GetForeColor(RGBColor *color)
  937.  = 0xAA19; 
  938. pascal void GetBackColor(RGBColor *color)
  939.  = 0xAA1A; 
  940. pascal void SeedCFill(const BitMap *srcBits,const BitMap *dstBits,const Rect *srcRect,
  941.  const Rect *dstRect,short seedH,short seedV,ColorSearchProcPtr matchProc,
  942.  long matchData)
  943.  = 0xAA50; 
  944. pascal void CalcCMask(const BitMap *srcBits,const BitMap *dstBits,const Rect *srcRect,
  945.  const Rect *dstRect,const RGBColor *seedRGB,ColorSearchProcPtr matchProc,
  946.  long matchData)
  947.  = 0xAA4F; 
  948. pascal PicHandle OpenCPicture(const OpenCPicParams *newHeader)
  949.  = 0xAA20; 
  950. pascal void OpColor(const RGBColor *color)
  951.  = 0xAA21; 
  952. pascal void HiliteColor(const RGBColor *color)
  953.  = 0xAA22; 
  954. pascal void DisposCTable(CTabHandle cTable)
  955.  = 0xAA24; 
  956. pascal void DisposeCTable(CTabHandle cTable)
  957.  = 0xAA24; 
  958. pascal CTabHandle GetCTable(short ctID)
  959.  = 0xAA18; 
  960. pascal CCrsrHandle GetCCursor(short crsrID)
  961.  = 0xAA1B; 
  962. pascal void SetCCursor(CCrsrHandle cCrsr)
  963.  = 0xAA1C; 
  964. pascal void AllocCursor(void)
  965.  = 0xAA1D; 
  966. pascal void DisposCCursor(CCrsrHandle cCrsr)
  967.  = 0xAA26; 
  968. pascal void DisposeCCursor(CCrsrHandle cCrsr)
  969.  = 0xAA26; 
  970. pascal CIconHandle GetCIcon(short iconID)
  971.  = 0xAA1E; 
  972. pascal void PlotCIcon(const Rect *theRect,CIconHandle theIcon)
  973.  = 0xAA1F; 
  974. pascal void DisposCIcon(CIconHandle theIcon)
  975.  = 0xAA25; 
  976. pascal void DisposeCIcon(CIconHandle theIcon)
  977.  = 0xAA25; 
  978. pascal void SetStdCProcs(CQDProcs *procs)
  979.  = 0xAA4E; 
  980. pascal void CharExtra(Fixed extra)
  981.  = 0xAA23; 
  982. pascal GDHandle GetMaxDevice(const Rect *globalRect)
  983.  = 0xAA27; 
  984. pascal long GetCTSeed(void)
  985.  = 0xAA28; 
  986. pascal GDHandle GetDeviceList(void)
  987.  = 0xAA29; 
  988. pascal GDHandle GetMainDevice(void)
  989.  = 0xAA2A; 
  990. pascal GDHandle GetNextDevice(GDHandle curDevice)
  991.  = 0xAA2B; 
  992. pascal Boolean TestDeviceAttribute(GDHandle gdh,short attribute)
  993.  = 0xAA2C; 
  994. pascal void SetDeviceAttribute(GDHandle gdh,short attribute,Boolean value)
  995.  = 0xAA2D; 
  996. pascal void InitGDevice(short qdRefNum,long mode,GDHandle gdh)
  997.  = 0xAA2E; 
  998. pascal GDHandle NewGDevice(short refNum,long mode)
  999.  = 0xAA2F; 
  1000. pascal void DisposGDevice(GDHandle gdh)
  1001.  = 0xAA30; 
  1002. pascal void DisposeGDevice(GDHandle gdh)
  1003.  = 0xAA30; 
  1004. pascal void SetGDevice(GDHandle gd)
  1005.  = 0xAA31; 
  1006. pascal GDHandle GetGDevice(void)
  1007.  = 0xAA32; 
  1008. pascal long Color2Index(const RGBColor *myColor)
  1009.  = 0xAA33; 
  1010. pascal void Index2Color(long index,RGBColor *aColor)
  1011.  = 0xAA34; 
  1012. pascal void InvertColor(RGBColor *myColor)
  1013.  = 0xAA35; 
  1014. pascal Boolean RealColor(const RGBColor *color)
  1015.  = 0xAA36; 
  1016. pascal void GetSubTable(CTabHandle myColors,short iTabRes,CTabHandle targetTbl)
  1017.  = 0xAA37; 
  1018. pascal void MakeITable(CTabHandle cTabH,ITabHandle iTabH,short res)
  1019.  = 0xAA39; 
  1020. pascal void AddSearch(ColorSearchProcPtr searchProc)
  1021.  = 0xAA3A; 
  1022. pascal void AddComp(ColorComplementProcPtr compProc)
  1023.  = 0xAA3B; 
  1024. pascal void DelSearch(ColorSearchProcPtr searchProc)
  1025.  = 0xAA4C; 
  1026. pascal void DelComp(ColorComplementProcPtr compProc)
  1027.  = 0xAA4D; 
  1028. pascal void SubPt(Point src,Point *dst)
  1029.  = 0xA87F; 
  1030. pascal void SetClientID(short id)
  1031.  = 0xAA3C; 
  1032. pascal void ProtectEntry(short index,Boolean protect)
  1033.  = 0xAA3D; 
  1034. #if !defined(__SC__) || !defined(THINK_C)
  1035. Boolean equalpt(Point *pt1,Point *pt2); 
  1036. #endif
  1037. pascal void ReserveEntry(short index,Boolean reserve)
  1038.  = 0xAA3E; 
  1039. pascal void SetEntries(short start,short count,CSpecArray aTable)
  1040.  = 0xAA3F; 
  1041. #if !defined(__SC__) || !defined(THINK_C)
  1042. Boolean ptinrect(Point *pt,const Rect *r); 
  1043. #endif
  1044. pascal void SaveEntries(CTabHandle srcTable,CTabHandle resultTable,ReqListRec *selection)
  1045.  = 0xAA49; 
  1046. pascal void RestoreEntries(CTabHandle srcTable,CTabHandle dstTable,ReqListRec *selection)
  1047.  = 0xAA4A; 
  1048. #if !defined(__SC__) || !defined(THINK_C)
  1049. void pt2rect(Point *pt1,Point *pt2,const Rect *destRect); 
  1050. #endif
  1051. pascal short QDError(void)
  1052.  = 0xAA40; 
  1053. pascal void CopyDeepMask(const BitMap *srcBits,const BitMap *maskBits,const BitMap *dstBits,
  1054.  const Rect *srcRect,const Rect *maskRect,const Rect *dstRect,short mode,
  1055.  RgnHandle maskRgn)
  1056.  = 0xAA51; 
  1057. pascal void DeviceLoop(RgnHandle drawingRgn,DeviceLoopDrawingProcPtr drawingProc,
  1058.  long userData,DeviceLoopFlags flags)
  1059.  = 0xABCA; 
  1060. #pragma parameter __A0 GetMaskTable
  1061. pascal Ptr GetMaskTable(void)
  1062.  = 0xA836; 
  1063. #if !defined(__SC__) || !defined(THINK_C)
  1064. void pttoangle(const Rect *r,Point *pt,short *angle); 
  1065. Boolean ptinrgn(Point *pt,RgnHandle rgn); 
  1066. void stdtext(short count,const void *textAddr,Point *numer,Point *denom); 
  1067. void stdline(Point *newPt); 
  1068. void drawstring(char *s); 
  1069. void addpt(Point *src,Point *dst); 
  1070. void stuffhex(Ptr thingPtr,char *s); 
  1071. short stringwidth(char *s); 
  1072. #endif
  1073.  
  1074. #ifdef __cplusplus
  1075. }
  1076. #endif
  1077.  
  1078. #endif
  1079.